/// total : 1
/// rows : [{"id":"471967792794185728","courseName":"在线课1","summary":"副标题","cover":"https://studycloud-test.oss-cn-hangzhou.aliyuncs.com/004da200-4299-11ec-a687-4de41983b297.jpg","price":0,"introduce":"课程介绍","buyCount":2,"isBuy":1,"createTime":1637628847000}]
/// code : 200
/// msg : "查询成功"

class OnlineClassDto {
  OnlineClassDto({
    int? total,
    List<Rows>? rows,
    int? code,
    String? msg,
  }) {
    _total = total;
    _rows = rows;
    _code = code;
    _msg = msg;
  }

  OnlineClassDto.fromJson(dynamic json) {
    _total = json['total'];
    if (json['rows'] != null) {
      _rows = [];
      json['rows'].forEach((v) {
        _rows?.add(Rows.fromJson(v));
      });
    }
    _code = json['code'];
    _msg = json['msg'];
  }
  int? _total;
  List<Rows>? _rows;
  int? _code;
  String? _msg;

  int? get total => _total;
  List<Rows>? get rows => _rows;
  int? get code => _code;
  String? get msg => _msg;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['total'] = _total;
    if (_rows != null) {
      map['rows'] = _rows?.map((v) => v.toJson()).toList();
    }
    map['code'] = _code;
    map['msg'] = _msg;
    return map;
  }
}

/// id : "471967792794185728"
/// courseName : "在线课1"
/// summary : "副标题"
/// cover : "https://studycloud-test.oss-cn-hangzhou.aliyuncs.com/004da200-4299-11ec-a687-4de41983b297.jpg"
/// price : 0
/// introduce : "课程介绍"
/// buyCount : 2
/// isBuy : 1
/// createTime : 1637628847000

class Rows {
  Rows({
    String? id,
    String? courseName,
    String? summary,
    String? cover,
    int? price,
    String? introduce,
    int? buyCount,
    int? isBuy,
    int? createTime,
  }) {
    _id = id;
    _courseName = courseName;
    _summary = summary;
    _cover = cover;
    _price = price;
    _introduce = introduce;
    _buyCount = buyCount;
    _isBuy = isBuy;
    _createTime = createTime;
  }

  Rows.fromJson(dynamic json) {
    _id = json['id'];
    _courseName = json['courseName'];
    _summary = json['summary'];
    _cover = json['cover'];
    _price = json['price'];
    _introduce = json['introduce'];
    _buyCount = json['buyCount'];
    _isBuy = json['isBuy'];
    _createTime = json['createTime'];
  }
  String? _id;
  String? _courseName;
  String? _summary;
  String? _cover;
  int? _price;
  String? _introduce;
  int? _buyCount;
  int? _isBuy;
  int? _createTime;

  String? get id => _id;
  String? get courseName => _courseName;
  String? get summary => _summary;
  String? get cover => _cover;
  int? get price => _price;
  String? get introduce => _introduce;
  int? get buyCount => _buyCount;
  int? get isBuy => _isBuy;
  int? get createTime => _createTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['courseName'] = _courseName;
    map['summary'] = _summary;
    map['cover'] = _cover;
    map['price'] = _price;
    map['introduce'] = _introduce;
    map['buyCount'] = _buyCount;
    map['isBuy'] = _isBuy;
    map['createTime'] = _createTime;
    return map;
  }
}
